/**
 * 验证邮箱
 */
export function validateEmail(value) {
  let reg = /^([a-zA-z]|[0-9])(\w|-)+@[a-zA-Z0-9]+\.(a-zA-Z){2,4}$/;
  return !reg.test(value);
}

/**
 * 验证密码：6-20位的字母+数字
 */
export function validatePassword(value) {
  let reg = /^(?!\D+$)(?![^a-zA-Z]+$)\s{6,20}/;
  return !reg.test(value);
}
